<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<title>绿地养护</title>
	<meta name="viewport"
		content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
	<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
	<link rel="stylesheet" type="text/css" href="../css/api.css" />
	<link rel="stylesheet" type="text/css" href="../css/globle.css" />
	<link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css" />
	<style>
		body {
			padding-top: 25px;
		}

		span {
			margin: 10px;
		}

		.Tabl {
			height: 50px;
			width: 88%;
			font-size: 14px;
			font-weight: bold;
			text-align: left;
			margin-left: 6%;
		}

		.Td1 {
			color: #B8B8B8;
			width: 110px;
		}

		.Td2 {
			color: #000000;
			text-align: left;
		}

		.Hr {
			height: 1px;
			width: 96%;
			background-color: #B8B8B8;
			margin-left: 2%;
		}

		.Butt {
			border: 1px solid #B8B8B8;
			border-radius: 20px;
			color: #FFFFFF;
			height: 17px;
			width: 17px;
			outline: none;
		}

		.TabImg {
			height: 150px;
			width: 96%;
			margin-left: 2%;
			border: 10px solid #D8D8D8;
		}

		.TdImg1 {
			height: 110px;
			width: 90px;
		}

		.TdImg2 {
			height: 110px;
			width: 90px;
		}

		.ButAdd {
			height: 110px;
			width: 100px;
			font-size: 100px;
			color: #FFFFFF;
			background-color: #B8B8B8;
		}

		.TabL {
			height: 75px;
			width: 88%;
			font-size: 16px;
			font-weight: bold;
			text-align: left;
			margin-left: 6%;
		}

		.ButL {
			height: 40px;
			width: 100%;
			background-color: #D0D0D0;
			position: fixed;
			bottom: 0;
		}

		.Td3 {
			text-align: center;
			width: 50%;
		}

		select {
			appearance: none;
			-moz-appearance: none;
			-webkit-appearance: none;
			border: none;
			background: none;
		}
	</style>
</head>

<body>
	<div class="container" id="jc">
		<div class="row">
			<div id="content" class="col-lg-12">
				<!-- EXPORT TABLES -->
				<div class="row">
					<div class="col-md-12">
						<!-- BOX -->
						<div class="box border green">
							<div class="box-body">
								<br>
								<div class="row">
									<div class="form-group">
										<div class="col-sm-12">
											<table class="table table-striped">
												<thead>
													<tr>
														<th><i class></i> 计划名称</th>
														<th><i class></i> 进度完成情况</th>
													</tr>
												</thead>

												<tr>
													<td width='30%'>
														<input class="form-control col-sm-2" :value="name" type="text" readonly />
													</td>
													<td width='30%'>
														<input class="form-control col-sm-2" :value="scom" type="text" readonly />
													</td>
												</tr>

											</table>
											<div class="col-md-6">
												<h3> 日计划列表 </h3>
												<table class="table table-striped">
													<thead>
														<tr>
															<th><i class></i> 绿地名称</th>
															<th><i class></i> 工作内容</th>
															<th><i class></i> 计划完成量</th>
														</tr>
													</thead>
													<tbody>

														<tr v-for="(drequ,index) in drequest1">
															<td width='30%'>
																<input class="form-control col-sm-2"
																	:value="drequ.greedLand.greedLandAdministrator.name" type="text" readonly />
															</td>
															<td width='30%'>
																<input class="form-control col-sm-2" :value="drequ.i_content" type="text" readonly />
															</td>
															<td width='30%'>
																<input class="form-control col-sm-2" :value="drequ.i_comp" type="text" readonly />
															</td>
														</tr>

													</tbody>
												</table>
											</div>
											<div class="col-md-6">
												<h3> 日总结列表 </h3>
												<table class="table table-striped">
													<thead>
														<tr>
															<th><i class></i> 绿地名称</th>
															<th><i class></i> 工作内容</th>
															<th><i class></i> 完成情况</th>
														</tr>
													</thead>
													<tbody>

														<tr v-for="(drequest,index) in drequest2">
															<td width='30%'>
																<input class="form-control col-sm-2"
																	:value="drequest.greedLand.greedLandAdministrator.name" type="text" readonly />
															</td>
															<td width='30%'>
																<input class="form-control col-sm-2" :value="drequest.su_content" type="text"
																	readonly />
															</td>
															<td width='30%'>
																<input class="form-control col-sm-2" :value="drequest.su_comp" type="text" readonly />
															</td>
														</tr>

													</tbody>
												</table>
											</div>
										</div>
									</div>
								</div>

							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="modal fade" id="yaopinModal" tabindex="1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="box border green">
				<div class="box-title">
					<h4><i class="fa fa-bars"></i> 选择绿地 </h4>
					<div class="tools hidden-xs">
						<a href="javascript:;" class="reload"> <i class="fa fa-refresh"></i> </a>
						<a href="javascript:;" data-dismiss="modal"> <i class="fa fa-times"></i> </a>
					</div>
				</div>
				<div class="box-body big">
					<div class="form-group">
						<div class="col-lg-4">
							<input type="text" id="yaopinName" value="${keywords}" name="keywords" placeholder="请输入查询"
								class="form-control">
						</div>
						<div class="col-lg-4">
							<button type="button" class="btn btn-success start" id="selectYaopin">
								<i class="fa fa-plus"></i>
								<span>查询信息</span>
							</button>
						</div>
					</div>
					<div class="form-group">
						<div class="col-sm-12">
							<table class="table table-striped" id="yaopinTab">
								<thead>
									<tr>
										<th> 绿地名称 </th>
										<th> 分类 </th>
										<th> 别称 </th>
									</tr>
								</thead>
								<tbody>
									<tr>
										<td colspan="5" height="100"> 请在上面查询你要查询的信息 </td>
									</tr>
								</tbody>
							</table>
						</div>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">
							关闭
						</button>
					</div>
				</div>
			</div>
		</div>
	</div>
</body>
<script type="text/javascript" src="../script/vue.js"></script>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script src="../script/jquery-1.11.0.min.js"></script>
<script type="text/javascript">
	var projectid = null;
	var reg = $api.getStorage("userSession");
	var sids = reg.data.sysRole.sysRoleCode;
	var role = sids.role_number;
	if (role != "construction") {
		projectid = $api.getStorage("selectpor").id;
	} else {
		projectid = reg.data.areaid;
	}
	var user = $api.getStorage('userSession');
	////企业id
	var qiyeid = $api.getStorage('userSession').data.enterprise.id;
	apiready = function () {
		//			api.setScreenOrientation({
		//				orientation : 'landscape_left'
		//			});
		//			//设置屏幕全屏，可选
		//			api.setFullScreen({
		//				fullScreen : true
		//			});
		//			//监听返回事件，设置当前页面为竖屏并关闭，父级页面就是竖屏了
		//			api.addEventListener({
		//				name : 'keyback'
		//			}, function(ret, err) {
		//				api.closeWin();
		//				api.setScreenOrientation({
		//					orientation : 'auto_portrait'
		//				});
		//			});
		var id = api.pageParam.id;
		var name = api.pageParam.name;
		var scom = api.pageParam.scom;
		//工作计划详细
		var apps = new Vue({
			el: '#jc',
			data: {
				name: '',
				scom: '',
				drequest1: [],
				drequest2: []
			},
			created: function () {
				this.name = name;
				this.scom = scom;
				$.ajax({
					type: "post",
					//async : false, //同步执行
					url: serverIP + "mobile/work_plan_week/findInfo.json",
					data: {
						i_pid: id
					},
					dataType: "json", //返回数据形式为json
					success: function (result) {
						//alert(JSON.stringify(result))
						apps.drequest1 = result.data;

					}
				});


				$.ajax({
					url: serverIP + "mobile/work_plan_week/findSummary.json",
					type: "POST",
					data: {
						su_pid: id
					},
					dataType: "json",
					success: function (ret) {
						//	alert(JSON.stringify(ret))
						apps.drequest2 = ret.data;
					},
					error: function (jqXHR, textStatus, errorThrown) {}
				});

			}
		})
	};
</script>

</html>